<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!-- jquery validate -->
<script src="<%=basePath %>resource/js/jquery.validate.min.js" ></script>


	<ul class="breadcrumb">
		<li><a href="#">主页</a></li>
		<li><a href="#">添加菜单</a></li>
	</ul>
</div>

<div class="row">
    <div class="box col-md-12">
        <div class="box-inner">
            <div data-original-title="" class="box-header well">
                <h2><i class="glyphicon glyphicon-edit"></i> 添加菜单</h2>

                <div class="box-icon">
                  
                    <a class="btn btn-minimize btn-round btn-default" href="#"><i class="glyphicon glyphicon-chevron-up"></i></a>
                    <a class="btn btn-close btn-round btn-default" href="#"><i class="glyphicon glyphicon-remove"></i></a>
                </div>
            </div>
            

            <div class="box-content">
                <form id="editForm" class="form-horizontal" action="<%=basePath%>admin/indexResourceAdd!indexResourceAdd.action" method="post">
				  <div class="form-group">
				    <label for="inputName" class="col-sm-2 control-label">名称</label>
				    <div class="col-sm-4">
				      <input type="text" name="resource.name" class="form-control required" id="inputName" placeholder="名称">
				    </div>
				  </div>
				  
				  <div class="form-group">
				    <label for="inputUrl" class="col-sm-2 control-label">url</label>
				    <div class="col-sm-4">
				      <input type="text" name="resource.url"  class="form-control" id="inputUrl" placeholder="url">
				    </div>
				  </div>
				  
				  
				  <div class="form-group">
				  	<label for="selectNode" class="col-sm-2 control-label">选择父菜单</label>
				     <div class="col-sm-4">
				      <select class="form-control" id="selectNode" name="resource.parentIds">
				         <s:iterator value="menu" id="m">
				         	<option value="<s:property value="#m.ids" />">
				         		<s:property value="#m.name"/>
				         	</option>
				         	<s:iterator value="%{#m.child}" id="c">
				         		<option value="<s:property value="#c.ids" />">
				         			<s:property value="#c.name"/>
				         		</option>
				         	</s:iterator>
				         </s:iterator>
				      </select>
				      </div>
				  </div>
				  
				  
				  
				  
				  <div class="form-group">
				    <label for="inlineRadio1" class="col-sm-2 control-label">是否启用</label>
				    <div class="col-sm-4">
				       <label class="radio-inline">
		                    <input type="radio" value="1" id="inlineRadio1" name="resource.status" checked> 是
		                </label>
		               <label class="radio-inline">
		                    <input type="radio" value="0" id="inlineRadio2" name="resource.status"> 否
		                </label>
				    </div>
				  </div>
				  
				  
				  
				 
				  
				  <div class="form-group">
				    <label for="textareaDes" class="col-sm-2 control-label">描述</label>
				    <div class="col-sm-4">
				       <textarea class="form-control" rows="3" name="resource.description" id="textareaDes"></textarea>
				    </div>
				  </div>
				  
				  
				  <div class="form-group">
				    <div class="col-sm-offset-2 col-sm-10">
				      <button onclick="dataVali(this.form);" type="button" class="btn btn-primary">提交</button>
				    </div>
				  </div>
				 <s:debug></s:debug>	
				  
				</form>

            </div>
        </div>
    </div>
    <!--/span-->